﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QTime>
#include <QTimer>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void initAndFlush();
    QList<QString> getListSerPort();

public slots:
    void readSerPort();
private slots:
    void on_pushButton_clicked();


    void on_pushButton_2_clicked();

    void on_pushButton_5_clicked();

    void on_pushButton_4_clicked();

    int on_pushButton_3_clicked();

    void on_checkBox_4_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_10_clicked();

    void on_commandLinkButton_clicked();

private:
    Ui::MainWindow *ui;
    QSerialPort* serPort = NULL;
    bool flagColorCout;
    QTimer *timer;
    int sendLen;
    int recLen;
};

#endif // MAINWINDOW_H
